What we've talked about insert mode in the previous video that is pressing I to start typing.
It's only one way to get in to insert mode though by pressing Oh we'll insert a line then the cursor
will be placed on the next one.
Press escape you can press you at any time to undo your previous action with Capital.
And your line will be placed at the cursor position and we'll be able to start writing from that line
above press Escape.
Again with a will start typing from the next character to the right of the cursor position.
Press escape from the one I want to mention about pressing escape.
You can look at the bottom of the edge or if insert mode is enabled by pressing Capitale a will start
typing the DND of the current line to start inserting text at the beginning of a line.
Breske capital I
to delete a character and please press X to delete the previous character Breske capital X..
You to undo.
To delete a line press the twice or Capitol the
by entering in visual block mode we can select the text we want to delete then press D to delete text
press B to enter in visual mode.
Then press the closing curly brace to select the paragraph then press the to delete.
Now that was fast wasn't it.
Anything that you delete is copied in vim so text isn't actually deleted but cut to paste.
You will just have to press B.
So let's see we wanted to paste the first paragraph at the end of the document V then closing curly
brace the capital G capital A to insert some blank text enter enter escape B.
Now this might seem convoluted but remember that your hands are stuck to the keyboard as you become
more skilled with fame.
It will take you two seconds tops to perform this action.
How much time will it take to do the same with a normal text editor.
Right.
I hope that the power of them is already shining through other movement.
Keys can be used to delete specific portions of the document.
The W will delete the next word for example
the J will delete the current and the next line and so on.
Like we've already done before we can define how many times we want an action to be performed.
Want to delete the next five words.
You will type the 5 W.
You can repeat any previous action by pressing the periodic character
with our we can replace a single character
press are then type the character you want to replace it with if you want to replace a character whether
it's lower or upper case counterpart just place the cursor on it and press it till day.
Character press Capitol are if you want to start replacing the character of the current cursor position
and keep replacing all the subsequent characters as you can see below.
It says Replace with C you can replace single words or lines depending on the movement command issued
after c by pressing C then the dollar sign the end of a line indicator we will delete the current line
from the current cursor position to the end of the line then get into insert mode to replace the rest
of the line.
Why instead copies text.
Why stands for yank.
We can press Y and for example w to copy the next word or Y followed by the dollar sign to copy the
line from the cursor current position.
Alternatively you can press Y twice or copyable.
Why then you will press B to be the whole line.
Press p to continue pasting the last text yanked.
Want to paste it a hundred times.
Press 1 0 0 then we want to get back to the beginning and undo everything we've done so far.
Certainly less than a thousand edits.
Right.
Let's type 1 0 0 0.
You press you to do the same tells us it's already at it's all this change.
You can also type in Colon the exclamation mark to the card.
All changes to repeat and actually instead that has been done press control are were already at the
newest change.
Let's take a look at some common key combinations the ones you need to use recurrently like for example
moving a line up or down with Pee Wee based text that were cut or copied after the cursor with capital
B.
We paste text before the cursor instead.
So let's say we have line 1 and line 2.
I don't want to wish them
if we wanted to put a line one after line 2.
We will just have to type D D P.
Now if we wanted to put a line one back to where it was we were type d d to remove the line then K to
go up one line then capital P D D K capital P depending on the type of work you're going to perform
on the files you will inevitably start performing those same operations over and over and then mindfully
memorize your own set of key combinations.
Start using vim everyday and you'll soon discover how much faster you're getting things done especially
after you've learned some of the internal.
These of the following videos.
You can join the lines with the shift J.
Let me show you.
PRESS shift J to join the lines.
And one last thing before ending the video.
When you're in search mode you can press control w to remove the previous word.
This can save time when you mistype a word and don't want to get back to normal mode.
Then insert again.
We'll press capital A to get it in insert mode at the end of the line then control w to delete the previous
word
good.
Practice on some documents and memorize as many key combinations as possible.